package P5.T03;

import javax.swing.*;
import java.awt.*;

public class T03 {
    public static void main(String[] args) {
        JFrame frame = new JFrame("BorderLayout");
        frame.setSize(400,400);
        frame.setLocation(200,200);
        frame.setVisible(true);
        frame.add(new JButton("北"), BorderLayout.NORTH);
        frame.add(new JButton("东"), BorderLayout.EAST);
        frame.add(new JButton("南"), BorderLayout.SOUTH);
        frame.add(new JButton("西"), BorderLayout.WEST);
        JButton btn=new JButton("中");
        btn.setSize(10,10);
        frame.add(btn, BorderLayout.CENTER);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
